package com.amos.core;

import java.util.List;

/**
 * Copyright © 2018 嘉源锐信. All rights reserved.
 *
 * @Project: mu-exam
 * @ClassName: BaseDao
 * @Package: com.amos.core
 * @author: zhuqb
 * @Description:
 * @date: 2020/3/4 0004 下午 17:28
 * @Version: V1.0
 */
public interface BaseDao<E extends BaseEntity> {
    /**
     * 根据Id查询
     *
     * @param id
     * @return
     */
    E queryById(String id);

    /**
     * 条件查询
     *
     * @param entity
     * @return
     */
    List<E> queryAll(E entity);

    /**
     * 插入
     *
     * @param entity
     * @return
     */
    int insert(E entity);

    /**
     * 根据id修改
     *
     * @param entity
     * @return
     */
    int update(E entity);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(String id);

}
